<extend name="Public/base" />
<block name="content">
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> 
			<a href="#" class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid search-form">
		<br/>
		<button class="btn btn-info" id="add">导入名单</button>
		<button class="btn btn-danger confirm" id="ids">配置可抢占人员</button>
		<div class=" fr cf">
			<div class="sleft">
				<span class="control-group">
					<select class="form-control" style="width: 120px;" name="roster_category_id" id="roster_category_id">
						<option value="0">请选择名单类别</option>
						<volist name="roster_category_list" id="vo">
							<option value="{$vo.roster_category_id}">{$vo.roster_category_name|strip_tags}</option>
						</volist>
					</select>
				</span>
				<input type="text" name="search_text" class="search-input" value="{:strip_tags(I('search_text'))}" placeholder="请输入名单名称" style="margin-bottom:0;">
				<button class="btn btn-info" id="search_button" url="{:U('ServiceManage/rollCallList')}"><i class="icon-search icon-white"></i></button>
			</div>
		</div>
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-content ">
					<notempty name="_list">
						<form id="export-form" method="post" action="" autocomplete="off">
							<table class="table table-bordered table-striped">
								<thead>
									<tr>
										<th><input class="checkbox check-all" type="checkbox"></th>
										<th nowrap="nowrap">序号</th>
										<th>名单名称</th>
										<th>名单类别</th>
										<th>导入记录总数</th>
										<th>呼叫状态</th>
										<th>导入时间</th>
										<th>导入人</th>
										<th>查看名单详情</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="_list" id="vo">
										<tr>
											<td class="taskStatus"><input type="checkbox" value="{$vo.roll_call_id}" name="id[]" class="ids"/></td>
											<td class="taskStatus">{$i}</td>
											<td class="taskStatus">{$vo.roll_call_name|htmlspecialchars|msubstr=###,0,40}</td>
											<td class="taskStatus">{$vo.roster_category_id|getRosterCategoryName|msubstr=###,0,20}</td>
											<td class="taskStatus">{$vo.total_num}</td>
											<td class="taskStatus">{$vo.status_text}</td>
											<td class="taskStatus">{$vo.create_time|time_format}</td>
											<td class="taskStatus">{$vo.create_user_id|getUserName}</td>
											<td class="taskStatus"><a href="{:U('infoRollCall?roll_call_id='.$vo['roll_call_id'])}">查看名单详情</a></td>
											<td class="taskStatus">
												<a href="{:U('setRollCallMember?id='.$vo['roll_call_id'])}"><i class="icon-cog"></i> 配置可抢占人员</a>
												
												<eq name="vo.status" value="0"><a href="{:U('changeRollCallStatus',array('id'=>$vo['roll_call_id'],'method'=>'resumeuser'))}" class="ajax-get confirm"><i class="icon-remove"></i> 抢占开始</a></eq>
												<eq name="vo.status" value="0"><a href="{:U('changeRollCallStatus',array('id'=>$vo['roll_call_id'],'method'=>'deleteUser'))}" class="ajax-get confirm"><i class="icon-remove"></i> 将名单删除</a></eq>
												<neq name="vo.status" value="0"><a href="{:U('changeRollCallStatus',array('id'=>$vo['roll_call_id'],'method'=>'forbiduser'))}" class="ajax-get confirm"><i class="icon-remove"></i> 抢占结束</a></neq>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
								{$_page}
							</div>
						</form>
					<else/>
						<center>暂无内容</center>
					</notempty>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function (){
	//新增跳转页面
	$('#add').click(function(){
		window.location.href="{:U('ServiceManage/addRollCall')}";
	});
	$("#ids").click(function(){
		$("#search_button").attr('url',"{:U('ServiceManage/setRollCallMember')}");
		$("#search_button").trigger('click');
	});
	//下拉菜单
	set_value("roster_category_id","{:I('roster_category_id','')}");
});
//导航高亮
highlight_subnav("{:U('ServiceManage/rollCallList')}");
</script>
</block>